package com.applet.system.mapper;

import java.util.List;

import com.applet.system.entity.dto.RoleDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.applet.system.entity.Role;

@Mapper
public interface RoleMapper {

	List<Role> getPage(Role role);
	
	List<Role> getAll();

	List<Long> getMenuIds(Long roleId);
	
	List<Long> getActionIds(Long roleId);
	
	int delete(@Param("ids") List<Long> ids);
	
	boolean getIsRoleNameExist(@Param("name")String name, @Param("id")Long id);
	
	int add(Role role);
	
	int update(Role role);
	
	Role getRoleById(Long roleId);
	
	int deleteRoleAuth(Long roleId);
	
	int insertRoleAuth(RoleDto role);
}
